using GLib;
using Gtk;


namespace Rob
{
	namespace UI
	{
		public class SendSMSWidget: Rob.UI.ActionWidget
		{

			private Rob.Actions.SendSMS _sms;
			private Gtk.Frame main_frame;
			private Gtk.Entry msg;

			construct
			{
				create_widgets();
			}
			public /*override*/ Rob.Actions.Action action
			{
				get {return this._sms;}
				set 
				{
					this._sms = (Rob.Actions.SendSMS)value;
					update_values();
				}
			}
			private void update_values()
			{
				this.msg.text = this._sms.text;
			}
			private void create_widgets()
			{
				this.msg = new Gtk.Entry();
				this.main_frame = new Gtk.Frame("Send Message");
				this.main_frame.add(this.msg);
				this.msg.changed += entry =>
				{
					this._sms.text = entry.text;
				};
			}
		}
	}
}
